package cc.jorange.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import cc.jorange.bean.Work;

/**
 * 
 * @author Aaron
 *
 */
public interface WorkDao extends PagingAndSortingRepository<Work, Long>, JpaSpecificationExecutor<Work> {

	@Query("from Work w where w.createDate=?1 Order by w.id desc")
	List<Work> findAll(String createDate);
	
	@Query("from Work w where w.id in (?1) Order by w.id desc")
	List<Work> findInId(List<Long> ids);

}
